﻿
//    using ChainStock.Controls;
using System;
using System.Data;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;

public partial class MemRechargeMoney : PageBase
{


    protected void Page_Load(object sender, EventArgs e)
    {
        if (!base.IsPostBack)
        {
            if (base.Request.QueryString["MemCard"] != null)
            {
                this.MemCard.Value = base.Request.QueryString["MemCard"];
            }
            this.lblAccount.InnerText = base.curParameter.strMemRechargePrefix + DateTime.Now.ToString("yyMMddHHmmssffff");
            this.lblRechargeTime.InnerText = DateTime.Now.ToString();
            this.lblRechargeUSer.InnerText = PubFunction.UserIDTOName(base._UserID);
            PubFunction.Get_PrintTitle(ref this.lblPrintTitle, ref this.lblPrintFoot, base._UserShopID);
            this.chkSMS.Checked = PubFunction.curParameter.bolMoneySms && base.curParameter.bolAutoSendSMSByMemRecharge;
            this.lblIsSMS.Style.Add("display", (base.curParameter.bolMoneySms && base.curParameter.bolAutoSendSMSByMemRecharge) ? "\"\"" : "none");
            this.chkIsSMS.Checked = PubFunction.curParameter.bolSms;
            this.chkPrint.Checked = PubFunction.curParameter.bolAutoPrint;
            this.PointNum.Value = PubFunction.GetPointNum("HYCZ");
            this.ucMemberSearch.BolSenseICCard = base.curParameter.bolSenseiccard;
            this.ucMemberSearch.BolContactICCard = base.curParameter.bolContacticcard;
            
            if (PubFunction.curParameter.bolIsStartMoney)
            {
                this.ltMoney.Text = dd();
            }
            else
            {
                this.ltMoney.Text = "<input type='text' id='txtMoneys' name='txtMoneys' runat='server' class='border_radius' value='0' maxlength='8'/>";
            }
            Get_ParameterList();
        }
    }
    private string dd()
    {
        string[] strInfo = PubFunction.curParameter.strMoneyList.Split("|".ToCharArray());        

        System.Text.StringBuilder sbHtml = new System.Text.StringBuilder();
        sbHtml.Append(string.Concat(new object[] {" <select name='user_state' id='txtMoneys' runat='server' class='selectWidth'>" }));
        sbHtml.Append("<option value='0'>===== 请选择 =====</option>");
        for (int i = 0; i < strInfo.Length; i++)
        {
            sbHtml.Append("<option value='" + strInfo[i] + "'>" + strInfo[i] + "</option>");
        }
        sbHtml.Append("</select>");
        return sbHtml.ToString();
    }

    private void Get_ParameterList()
    {
        Chain.BLL.Activity ActivityBll = new Chain.BLL.Activity();
        DataTable dt = ActivityBll.ActivityShow();

        foreach (DataRow dr in dt.Rows)
        {

            ActivityID.Items.Add(new ListItem(dr["Name"].ToString(), dr["ID"].ToString()));

        }

    }
}


